Why are rebuilt packages overwritten by 'apt upgrade'?

News and discussion about development of the Debian OS itself

Why are rebuilt packages overwritten by 'apt upgrade'?

Postby maverick6664 » 2018-11-20 09:27

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!
maverick6664
 
Posts: 6
Joined: 2018-11-20 09:20

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

Postby Segfault » 2018-11-20 10:31

14 years ago I had similar problem with Debian. I installed Gentoo to avoid going nuts.
Segfault
 
Posts: 811
Joined: 2005-09-24 12:24

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

Postby maverick6664 » 2018-11-20 11:14

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-blacklist-package-updates-ubuntu-debian-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'?

Postby maverick6664 » 2018-11-20 11:46

oh, my mistake??

Somehow, some blacklisted packages can be upgraded....others are blocked...why? It doesn't seem to work.
maverick6664
 
Posts: 6
Joined: 2018-11-20 09:20

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

Postby Segfault » 2018-11-20 12:07

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!
Segfault
 
Posts: 811
Joined: 2005-09-24 12:24

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

Postby reinob » 2018-11-20 12:58

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..
reinob
 
Posts: 568
Joined: 2014-06-30 11:42

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

Postby maverick6664 » 2018-11-20 13:02

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.
maverick6664
 
Posts: 6
Joined: 2018-11-20 09:20

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

Postby milomak » 2018-11-20 13:13

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: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Debian Sid, Win10,
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Debian Sid
milomak
 
Posts: 1855
Joined: 2009-06-09 22:20

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

Postby maverick6664 » 2018-11-20 14:47



Thanks. But I found adding "a" or any alphabet or string after the version number manually worked. "a" is easy.

Regards,

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

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

Postby Bulkley » 2018-11-20 15:24

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>
Bulkley
 
Posts: 5666
Joined: 2006-02-11 18:35

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

Postby Head_on_a_Stick » 2018-11-20 15:56

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
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8322
Joined: 2014-06-01 17:46
Location: /dev/chair

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

Postby maverick6664 » 2018-11-21 01:26

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
maverick6664
 
Posts: 6
Joined: 2018-11-20 09:20


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable