I have a local repository setup on the server (server1) hosted by Nginx. It has few .deb packages and a bash script on another local server (server 2) uses the repo to install packages. I had to change a file inside a package, so I extracted the package and rebuilt it with a new version number (1.3-0-0) in the filename as well as in the control file inside the package. The bash script is still looking for the old package with specific version (1.2-0-0) and not installing the new package.
On server 1 the packages are in /var/www/folder1/repo and Nginx access logs show that server 2 bash script is requesting the the packages from the repository and I see it's requesting the old version.
On the server 1 where the packages are hosted, if I directly enter the URL pointing to the new and old packages in browser, both packages are being downloaded directly.
The contents of localrepository.list in /etc/apt/sources.list.d are:
deb [trusted=yes] http://server_hostname/ repo folder1
The script part where the packages are installed:
for package in xml-service update-legacy server-scripts; do
apt-get update
apt-get install -y $package
done
server-scripts package is not being installed which is the one I modified. The main question is as to why it's asking for the old package server-scripts 1.2-0-0. I moved the old package outside the repo folder. It should be asking for server-scripts 1.3-0-0.
From the logs, it's installing the first package like this:
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
xml-service
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 453 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://server_hostname repo/folder1 amd64 xml-service all **0.94.3-2** [453 kB]
Fetched 453 kB in 0s (6,008 kB/s)
Selecting previously unselected package xml-service.
Selecting previously unselected package xml-service.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 72356 files and directories currently installed.)
Preparing to unpack .../xml-service_0.94.3-2_all.deb ...
Unpacking xml-service (0.94.3-2) ...
Setting up xml-service (0.94.3-2) ...
Now when it comes to the package I modified: I don't full error logs at the moment but it's something like this:
Error: server-scripts 1.2-0-0 cannot be found
I don't if any caching is happening and if so, I can't figure it out where.