<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-live-build.git/scripts/build/clean, branch cla</title>
<subtitle> (mirror of https://github.com/vyos/vyos-live-build.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-live-build.git/atom?h=cla</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-live-build.git/atom?h=cla'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/'/>
<updated>2021-01-15T09:22:29+00:00</updated>
<entry>
<title>Apply SOURCE_DATE_EPOCH to newly generated files and create a log</title>
<updated>2021-01-15T09:22:29+00:00</updated>
<author>
<name>Roland Clobus</name>
<email>rclobus@rclobus.nl</email>
</author>
<published>2021-01-02T16:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=91e1e65c873291d11495730d8ce6df5940706c2b'/>
<id>urn:sha1:91e1e65c873291d11495730d8ce6df5940706c2b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>clean: handle all common options</title>
<updated>2020-05-15T19:36:51+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-04-28T18:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=263f84fe801f1664150673158495f26c9ce5ab32'/>
<id>urn:sha1:263f84fe801f1664150673158495f26c9ce5ab32</id>
<content type='text'>
support for options like `--debug` was missing.

Gbp-Dch: Short
</content>
</entry>
<entry>
<title>clean: refactor</title>
<updated>2020-05-15T19:36:51+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-04-28T18:41:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=fca128314754d937510312ce41ac39ae5d4d8125'/>
<id>urn:sha1:fca128314754d937510312ce41ac39ae5d4d8125</id>
<content type='text'>
this simplifies things to avoid the messy recursion.

it is also a necessary step to implementing handling of common options
like --debug. we need to process all options to decide how to approach
doing things (e.g. with debug messages to be output or not) before actually
performing any work, in order for options like --debug to be reacted to
properly.

also, as things were, options like `--debug` were not being passed along
in the recursive executions, while now that is no longer an issue.

the order of file/folder deletions for `--all`|`--purge`|`--remove`
actions is slightly changed here, but i don't see any issue with that and
it's cleaner to not preserve that.

Gbp-Dch: Short
</content>
</entry>
<entry>
<title>make temporary state of installed tools recoverable</title>
<updated>2020-05-05T18:43:15+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-05-05T00:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=f27d13de08af9ae788b0d2f848e2202a399e4f43'/>
<id>urn:sha1:f27d13de08af9ae788b0d2f848e2202a399e4f43</id>
<content type='text'>
some scripts temporarily install packages to accomplish some work before
then removing them. the list of packages installed is kept in memory in a
variable.

a weakness of this design is that if a failure occurs or the user cancels,
and then following this the user re-runs `lb build`, letting it try to
pick up and recover from where it left off, that list of packages that had
been installed is lost, resulting in those packages that were installed
then being a permanent part of the chroot.

here we fix this weakness by backing up the list to a file, which is always
read from on removal. thus in a recovery situation, any packages still
installed from a situation like that just described, will be removed upon
the next use of `Remove_package()`.

this is not perfect, since we are having to wait for opportunistic
execution of the remove function. we need to find a suitable place for the
`Cleanup_temp_packages()` function to be used.

 - doing so in `Init_config_data()` would not be suitable because we don't
   hold the lock when that's run, even if we ignored the hijacking of that
   function for taking such action...
 - doing it in `Exit()` doesn't seem a good fit either.
 - putting it explicitly in every build script just seems a little messy...

perhaps a local exit trap like for removing the lock...?

note that `binary_rootfs` skips running the remove function after installing
tooling, since it just throws the wrapper chroot away, which then leaves the
file around with stale data for the next remove instance to pick up, which
then does not actually remove it because it's not installed. this is not
ideal either... perhaps the optimisation should be removed from that script?

Gbp-Dch: Short
</content>
</entry>
<entry>
<title>get rid of a couple of useless variables</title>
<updated>2020-05-04T12:21:12+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-05-04T12:21:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=7acd1f488f3b9d4348449a27d9412488dc8e1657'/>
<id>urn:sha1:7acd1f488f3b9d4348449a27d9412488dc8e1657</id>
<content type='text'>
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>clean: tweak init</title>
<updated>2020-05-04T12:14:57+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-05-04T12:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=76459a39cdc6f35485a867fd96c7cce29a2cc6b9'/>
<id>urn:sha1:76459a39cdc6f35485a867fd96c7cce29a2cc6b9</id>
<content type='text'>
`Init_config_data` is more suited to build scripts than here. note that
it's not used in `config` either. this deliberately does not pass along
arguments to it because `Arguments()` can only handle the basic common
options, not the `clean` set. this is somewhat confusing and causes a
pointless execution of `getopt`. furthermore the function is expanding
slightly further beyond it's original scope, with yet more change coming
that's unsuitable for `clean`, so it makes sense to avoid using the
function here just for the couple of function calls needed.

validation of the config is disabled, as it is not performed currently.
it is not clear if it should be enabled or not for `clean`. it may be
useful to not validate, if we wish to be able to provide users with an
option to be able to delete the config.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>clean: output error on invalid argument</title>
<updated>2020-05-02T17:44:12+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-05-02T17:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=640a25f78d312dbd2553ab11131de02a9de3b2f0'/>
<id>urn:sha1:640a25f78d312dbd2553ab11131de02a9de3b2f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>clean: expand debugging</title>
<updated>2020-05-02T16:07:29+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-04-28T15:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=b2b260242974a3a9ff479f7b597af96b8ea13d0d'/>
<id>urn:sha1:b2b260242974a3a9ff479f7b597af96b8ea13d0d</id>
<content type='text'>
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>clean: fix missing 'noauto' param for substage execution</title>
<updated>2020-05-02T13:59:19+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-04-28T15:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=f20b5b4d0ded4a870e5795d4fe277af61f20c0e3'/>
<id>urn:sha1:f20b5b4d0ded4a870e5795d4fe277af61f20c0e3</id>
<content type='text'>
these should be bypassing the possibility of running the auto script
surely, just like how this is done for `--all`, otherwise you pass through
the auto file twice.

Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>clean: improve arg handling</title>
<updated>2020-05-02T13:59:12+00:00</updated>
<author>
<name>Lyndon Brown</name>
<email>jnqnfe@gmail.com</email>
</author>
<published>2020-04-28T15:23:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-live-build.git/commit/?id=2d4b2c9e76dbb3a6625c2e550a0e9b5fd241785f'/>
<id>urn:sha1:2d4b2c9e76dbb3a6625c2e550a0e9b5fd241785f</id>
<content type='text'>
 - detect lack of options using actual arg count rather than first arg
   being an empty string.
 - fix string splitting issues by looping properly on "${@}"
 - tidier

Gbp-Dch: Ignore
</content>
</entry>
</feed>
