[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: release as a package or add to APT's file list?



Jarno Elonen <elonen@debian.org> writes:

> The package is here..
>
>   http://funkyware.konflux.at/debian/pool/u/upgrade-system/
>
> ..and the said utility script looks like this:
>
> ------------------------------------
> source /etc/upgrade-system.conf
>
> echo "Updating available package lists..."
> apt-get -q=2 update

apt-get autoclean

Too free unneeded debs, could prevent var from getting too ful on
upgrade in some cases. Best to make it optinal, some people like to
keep the cache. $PRECLEANOPTS?

> echo -e "\nUpgrading installed packages..."
> apt-get $UPGRADEOPTS

This might fail if the cache is filled and /var nearly full. 

> echo -e "\nCleaning APT cache..."
> apt-get clean

Why clean? autoclean might be btter there since it only removes
obsolete debs while keeping the caching functional. $POSTCLEANOPTS?

> if [ -f /usr/bin/deborphan ]
> then
> 	echo -e "\nChecking for orphan files..."
> 	if [ `deborphan $ORPHANOPTS | wc -l | tr -d " "` = 0 ];
> 	then
> 		echo "No orphan file to be purged."
> 	else
> 		echo "Purging orphan files..."
> 		deborphan $ORPHANOPTS | xargs dpkg --purge
> 	fi
> fi

Thats the same as calling

debfoster -f -o RemoveCmd="apt-get --purge remove -y"

right?

> if [ -f /usr/bin/update-menus ]
> then
> 	echo -e "\nUpdating menus..."
> 	update-menus
> fi

That should be done by the postrm scripts but what the hell.

> echo -e "\nSystem upgrade completed."
> ------------------------------------

----------------------------------------------------------------------

That said some suggestions.

You could check for debfoster or deborphan and use either one. I think
aptidute, once setup, has the same functionality to clean up the
system too. So you would have 3 options there.

The script could be included in /usr/share/doc/deborphan/examples/ (or
other packages) and the manpages could be merged into the same
package. Deborphan/debfoster/aptitude could come with a cron job for
this included but have it disabled by default (Advantage being that
the script updates automatically and you only have to toggle one option).

If the mainatiner of said package(s) is cooperative there should be no
problem merging it in.

Another likely package to merge with would be apt-utils. Its a utility
for apt to improve it, like the preconfiguring of packages.

MfG
        Goswin



Reply to: