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

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



On Wed, 19 May 2004, Goswin von Brederlow wrote:

> 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?

Sure, I could add that.  Easily done.  Good idea.


> > echo -e "\nUpgrading installed packages..."
> > apt-get $UPGRADEOPTS
> 
> This might fail if the cache is filled and /var nearly full. 

Not at all, since previous runs of this script would have cleaned the cache on
their way out.


> > 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?

The point is to keep the cache empty, to prevent filing of /var.


> > 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?

No.  Debfoster depends on keeper lists.  For deborphan, this is optional.


> > 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.

"menu" is such a sloppily written application that on m68k and hppa, I regularly
get messages saying "cannot lock pid file, process already in use. aborting"
because menu was already crawling its ass updating menus for one package and
ends up missing updating them for the next package to install.


> 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.

Debfoster depends upon deborphan.  I will not add another useless dependency.
Likewise for aptitude.  Meanwhile, APT is already there by default and deborphan
is either a dependency or recommended for several packages.

Note that I did NOT say that aptitude and debfoster are crap. I have only said
that adding them as dependencies is not justified.


> The script could be included in /usr/share/doc/deborphan/examples/ (or
> other packages) and the manpages could be merged into the same
> package. 

Including it in examples misses the point of having the script ready-to-use.  
It's not a "deborphan scripting how-to" it's a script on its own.

> 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).

Proven to be somewhat dangerous, because several packages have severely broken
assumptions if you run apt-get on a fully quiet and automatic mode.


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

Including it in apt-utils almost makes sense to me.

-- 
Martin-Éric Racine, ICT Consultant
http://www.pp.fishpool.fi/~q-funk/



Reply to: