[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove package from repo #636

Closed
AHPyXA opened this issue Sep 13, 2017 · 4 comments · Fixed by #640
Closed

Can't remove package from repo #636

AHPyXA opened this issue Sep 13, 2017 · 4 comments · Fixed by #640
Labels

Comments

@AHPyXA
Copy link
AHPyXA commented Sep 13, 2017

Hello.

I added new package in repo and need to replace it with new version, but
aptly repo remove my_repo new_package
only shows

Loading packages...

ends and don't do anything.

If I trying to delete one of my old packages all works as expected

Command
aptly repo show -with-packages my_repo
shows new_package in the list, but
aptly package show new_package
doesn't show anything

I tried add new version with -force-replace - look's like it's done, but I still can't view information or delete this package.

aptly db cleanup and aptly db recover can't fix this

aptly version: 1.1.1

What can I try to do else?

@smira
Copy link
Contributor
smira commented Sep 14, 2017

It's hard to say anything without details. But in general looks like package query new_package is wrong and doesn't match any package.

https://www.aptly.info/doc/feature/query/

@smira smira added the question label Sep 14, 2017
@AHPyXA
Copy link
Author
AHPyXA commented Sep 14, 2017

Sorry for so abstract explanation.
Here is a nearly raw output

root@repo:~# aptly repo show -with-packages exp-trusty-local
Name: exp-trusty-local
Comment: Infra Local Repo
Default Distribution: trusty
Default Component: main
Number of packages: 20
Packages:
  VMware-Horizon-Client_4.5.0_all
  firefox-esr_52.3.0_all
  firefox-esr_52.2.1_all
  firefox-esr_52.1.2_all
  firefox-esr_52.1.1_all
...

My problem is "VMware-Horizon-Client_4.5.0_all"

Trying to delete

root@repo:~# aptly repo remove exp-trusty-local VMware-Horizon-Client_4.5.0_all
Loading packages...
root@repo:~# 

Trying to get info:

root@repo:~# aptly package show VMware-Horizon-Client_4.5.0_all
root@repo:~# 

But other packages are ok

root@repo:~# aptly package show firefox-esr_52.1.1_all
Package: firefox-esr
Priority: optional
Section: net
Maintainer: information
Architecture: all
Version: 52.1.1
Filename: firefox-esr-52.1.1.deb
Size: 50556576
MD5sum: 7dc3815732a1762cfcc96720b16a3bc7
SHA1: dc027e157a93e42366f8a6ef3f0a1226ee9bc27e
SHA256: ebf8a85ea37878f96a616c26a9439d9a9211b8b52ac59e9e984fbce9a9a31f67
SHA512: 200ab23b79d1b5d12625d043c41d8bc4d1aac0dc425aa4bf4a500a611dc79fef86dae4436dce22a5f47a6e8b11de19120393a86ef8f4b8197fd285b6c677b07d
Description: Firefox ESR 52.1.1
root@repo:~# aptly repo remove exp-trusty-local firefox-esr_52.1.1_all
Loading packages...
[-] firefox-esr_52.1.1_all removed
root@repo:~# 

@smira
Copy link
Contributor
smira commented Sep 15, 2017

@AHPyXA thanks, I see the problem now - it's the package name which starts with captial letter (VMware...), aptly treats that in a wrong way.

I'll get this bug fixed, in the meantime you can try using other formats of package query to match it, like (Name VMware-Horizon-Client)

@AHPyXA
Copy link
Author
AHPyXA commented Sep 15, 2017

@smira Thank you!

Query with 'Name' did the trick

aptly package show 'Name (% VMware-Horizon-Client)'
Package: VMware-Horizon-Client
Priority: optional
Section: internet
Installed-Size: 130
Maintainer: support
Architecture: all
Version: 4.5.0
Filename: vmware-horizon-client.deb
Size: 15809118
MD5sum: bcf78591708d0e9aa46c2a713d37807a
SHA1: 327fdcb749c7ff5f8e2a1b909675fdcee722a16a
SHA256: 1eb5c7ac65713d2e2434010f14bde961d5d5dd7e56a630ee97398fa98c74f69a
SHA512: 7d3dce2bef4dc911a230f955369eeee4b09974a77cf9f49491959eca768e1fab0388ea7e9a987104f392a36ba42d9d29faf315ecffda503a10f148370e260d3e
Description: Client.

Now I can remove the package

aptly repo remove exp-trusty-local 'Name (% VMware-Horizon-Client)'
Loading packages...
[-] VMware-Horizon-Client_4.5.0_all removed

smira added a commit that referenced this issue Sep 18, 2017
Fixes: #636

Before this fix, aptly was always treating strings starting with
uppercase letter as field name, which was breaking package queries
like `VMware-Horizon-Client_4.5.0_all`.

Now aptly accepts only fields which don't contain underscore, and
everything else would be parsed as package reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants