Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Why are rebuilt packages overwritten by 'apt upgrade'?

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Why are rebuilt packages overwritten by 'apt upgrade'?

#1 Post by maverick6664 »

Hi,

I decided to build packages by myself with new compiler flags to optimize and found it was rather easy. I just write ~/.config/dpkg/buildflags.conf and build source packages. Then install (replace) them.

However, when invoking "apt upgrade", the replaced packages are overwritten by the original packages which are downloaded again. How can I stop it?

Thanks in advance!

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#2 Post by Segfault »

14 years ago I had similar problem with Debian. I installed Gentoo to avoid going nuts.

maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#3 Post by maverick6664 »

I had been using gentoo for nearly 10 years, but now I am using encrypted disks. So Gentoo is very difficult to install and I abandoned.

Now I solved my problem. I found https://www.tecmint.com/disable-lock-bl ... ebian-apt/, which mentioned how to blacklist specified packages. But now I wonder how I can find blacklisted packages are newly updated in the distribution.....

maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#4 Post by maverick6664 »

oh, my mistake??

Somehow, some blacklisted packages can be upgraded....others are blocked...why? It doesn't seem to work.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#5 Post by Segfault »

Going nuts, told ya ...

In Gentoo everything becomes super easy as soon as you understand how it works. Encryption included.

Edit: I lost the fight with "supercow" (apt-get), may you have better success!

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#6 Post by reinob »

maverick6664 wrote:Hi,

I decided to build packages by myself with new compiler flags to optimize and found it was rather easy. I just write ~/.config/dpkg/buildflags.conf and build source packages. Then install (replace) them.

However, when invoking "apt upgrade", the replaced packages are overwritten by the original packages which are downloaded again. How can I stop it?

Thanks in advance!
AFAIK if you rebuild a package you have to change the version number/label so that apt et al. will consider it newer than the package version currently in the repository.

Of course, if a new version comes up, then the version number might be higher than what you have, so apt will want to replace it -- but anyway you will (probably) also want to rebuild your custom package based on the latest version..

maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#7 Post by maverick6664 »

AFAIK if you rebuild a package you have to change the version number/label so that apt et al. will consider it newer than the package version currently in the repository.

Of course, if a new version comes up, then the version number might be higher than what you have, so apt will want to replace it -- but anyway you will (probably) also want to rebuild your custom package based on the latest version..
It's a nice idea! Yes, I want to know when the new version comes out, so that I can build my own customized one.

Thank you very much!!

EDIT: BTW as for Gentoo, I am fed up with their policy that they are providing both openrc and systemd options and Gentoo has a lot of web pages describing encryption and uefi, some of which are too old. And some packages are old. So I've abandoned.

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#8 Post by milomak »

maverick6664 wrote:
AFAIK if you rebuild a package you have to change the version number/label so that apt et al. will consider it newer than the package version currently in the repository.

Of course, if a new version comes up, then the version number might be higher than what you have, so apt will want to replace it -- but anyway you will (probably) also want to rebuild your custom package based on the latest version..
It's a nice idea! Yes, I want to know when the new version comes out, so that I can build my own customized one.

Thank you very much!!

EDIT: BTW as for Gentoo, I am fed up with their policy that they are providing both openrc and systemd options and Gentoo has a lot of web pages describing encryption and uefi, some of which are too old. And some packages are old. So I've abandoned.
this should be helpful
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#9 Post by maverick6664 »

milomak wrote: this should be helpful
Thanks. But I found adding "a" or any alphabet or string after the version number manually worked. "a" is easy.

Regards,

-Tetsuji

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#10 Post by Bulkley »

In an era of RPM "dependency hell" Debian offered relief with apt-get. The Debian advantage has always been its package management. Even its stability is a function of its package management. Of course, every solution generates new problems. I use the following when I want to hold a package.

Code: Select all

# apt-mark hold <package-name>

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#11 Post by Head_on_a_Stick »

maverick6664 wrote:when invoking "apt upgrade", the replaced packages are overwritten by the original packages which are downloaded again. How can I stop it?
Add an epoch to the version for your package:

https://www.debian.org/doc/debian-polic ... ml#version
deadbang

maverick6664
Posts: 6
Joined: 2018-11-20 09:20

Re: Why are rebuilt packages overwritten by 'apt upgrade'?

#12 Post by maverick6664 »

Head_on_a_Stick wrote:
maverick6664 wrote:when invoking "apt upgrade", the replaced packages are overwritten by the original packages which are downloaded again. How can I stop it?
Add an epoch to the version for your package:

https://www.debian.org/doc/debian-polic ... ml#version
Oh, nice idea!

Thanks, Head_on_a_Stick!!

And Segfault, I found a good way to use Gentoo; I am using VMware. So I'll install Gentoo on it, w/o encryption. Very easy!!

Regards,

-Tetsuji

Post Reply