Bug 2607 - [Anolis 23 Preview][x86/arch64]at软件包卸载失败
Summary: [Anolis 23 Preview][x86/arch64]at软件包卸载失败
Status: CLOSED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: happy_orange
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-27 15:12 UTC by yunmeng365524
Modified: 2022-11-01 20:27 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yunmeng365524 2022-10-27 15:12:15 UTC
Description of problem:
at软件包卸载失败

Version-Release number of selected component (if applicable):

[root@iZbp14ub0x084rkaiux0krZ job-results]# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
[root@iZbp14ub0x084rkaiux0krZ job-results]# uname -a
Linux iZbp14ub0x084rkaiux0krZ 5.10.134-12.1.an23.x86_64 #1 SMP Thu Oct 13 11:38:24 CST 2022 x86_64 GNU/Linux

How reproducible:
[root@iZbp14ub0x084rkaiux0krZ job-results]# yum erase at
Failed to set locale, defaulting to C.UTF-8
Dependencies resolved.
========================================================================================================================================
 Package                    Architecture                   Version                               Repository                        Size
========================================================================================================================================
Removing:
 at                         x86_64                         3.2.5-1.an23                          @@System                         127 k

Transaction Summary
========================================================================================================================================
Remove  1 Package

Freed space: 127 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1
  Running scriptlet: at-3.2.5-1.an23.x86_64                                                                                         1/1
/var/tmp/rpm-tmp.9BEGcG: line 1: fg: no job control
error: %preun(at-3.2.5-1.an23.x86_64) scriptlet failed, exit status 1

Error in PREUN scriptlet in rpm package at
  Verifying        : at-3.2.5-1.an23.x86_64                                                                                         1/1

Failed:
  at-3.2.5-1.an23.x86_64

Error: Transaction failed

Steps to Reproduce:
同上

Actual results:
卸载失败

Expected results:
卸载成功

Additional info:
anolis8上上可以正常卸载的:
[root@bcf7a9d4f88c home]# yum erase at
Dependencies resolved.
=======================================================================================================================================
 Package                    Architecture                   Version                               Repository                       Size
=======================================================================================================================================
Removing:
 at                         x86_64                         3.1.20-11.el8                         @BaseOS                         125 k

Transaction Summary
=======================================================================================================================================
Remove  1 Package

Freed space: 125 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                               1/1
  Running scriptlet: at-3.1.20-11.el8.x86_64                                                                                       1/1
  Erasing          : at-3.1.20-11.el8.x86_64                                                                                       1/1
  Running scriptlet: at-3.1.20-11.el8.x86_64                                                                                       1/1
  Verifying        : at-3.1.20-11.el8.x86_64                                                                                       1/1

Removed:
  at-3.1.20-11.el8.x86_64

Complete!
[root@bcf7a9d4f88c home]# uname -a
Linux bcf7a9d4f88c 4.19.91-26.an8.x86_64 #1 SMP Tue May 24 13:10:09 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 happy_orange alibaba_cloud_group 2022-10-27 16:54:00 UTC
经查看发现 at 在编译时没有识别出 %{_unitdir} 路径,导致服务文件没有存放在正确位置,
已经在此 pr 中解决:https://gitee.com/src-anolis-os/at/pulls/4。
验证:
1. 卸载 
[root@iZbp1jenlv6zmemz4juo9xZ feo]# yum erase at
Failed to set locale, defaulting to C.UTF-8
Dependencies resolved.
=====================================================================================================================================
 Package                  Architecture                 Version                             Repository                           Size
=====================================================================================================================================
Removing:
 at                       x86_64                       3.2.5-2.an23                        @@commandline                       126 k

Transaction Summary
=====================================================================================================================================
Remove  1 Package

Freed space: 126 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                             1/1
  Running scriptlet: at-3.2.5-2.an23.x86_64                                                                                      1/1
Removed /etc/systemd/system/multi-user.target.wants/atd.service.

  Erasing          : at-3.2.5-2.an23.x86_64                                                                                      1/1
  Running scriptlet: at-3.2.5-2.an23.x86_64                                                                                      1/1
  Verifying        : at-3.2.5-2.an23.x86_64                                                                                      1/1

Removed:
  at-3.2.5-2.an23.x86_64

Complete!

2、服务文件路径:
[root@iZbp1jenlv6zmemz4juo9xZ feo]# rpm -ql at
/etc/at.deny
/etc/pam.d/atd
/etc/sysconfig/atd
/usr/bin/at
/usr/bin/atq
/usr/bin/atrm
/usr/bin/batch
/usr/lib/.build-id
/usr/lib/.build-id/46
/usr/lib/.build-id/46/3f7242ed66313ff3d1f5dd93f2be83fe99df25
/usr/lib/.build-id/9a
/usr/lib/.build-id/9a/adac6257c3304ab8406401dad68a7b83231646
/usr/lib/systemd/system/atd.service
Comment 2 happy_orange alibaba_cloud_group 2022-10-28 10:08:07 UTC
请配置最新镜像源测试。 at-3.2.5-2.an23  修复
Comment 3 yunmeng365524 2022-11-01 20:27:01 UTC
[root@localhost anuser]# yum install -y at
Last metadata expiration check: 0:03:27 ago on Tue Nov  1 20:23:00 2022.
Dependencies resolved.
========================================================================================================================================
 Package                    Architecture                   Version                                 Repository                      Size
========================================================================================================================================
Installing:
 at                         x86_64                         3.2.5-2.an23                            BaseOS                          59 k

Transaction Summary
========================================================================================================================================
Install  1 Package

Total download size: 59 k
Installed size: 126 k
Downloading Packages:
at-3.2.5-2.an23.x86_64.rpm                                                                              3.6 MB/s |  59 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   3.5 MB/s |  59 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1
  Installing       : at-3.2.5-2.an23.x86_64                                                                                         1/1
  Running scriptlet: at-3.2.5-2.an23.x86_64                                                                                         1/1
Created symlink /etc/systemd/system/multi-user.target.wants/atd.service → /usr/lib/systemd/system/atd.service.

  Verifying        : at-3.2.5-2.an23.x86_64                                                                                         1/1

Installed:
  at-3.2.5-2.an23.x86_64

Complete!
[root@localhost anuser]# yum erase -y at
Dependencies resolved.
========================================================================================================================================
 Package                    Architecture                   Version                                Repository                       Size
========================================================================================================================================
Removing:
 at                         x86_64                         3.2.5-2.an23                           @BaseOS                         126 k

Transaction Summary
========================================================================================================================================
Remove  1 Package

Freed space: 126 k
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1
  Running scriptlet: at-3.2.5-2.an23.x86_64                                                                                         1/1
Removed /etc/systemd/system/multi-user.target.wants/atd.service.

  Erasing          : at-3.2.5-2.an23.x86_64                                                                                         1/1
  Running scriptlet: at-3.2.5-2.an23.x86_64                                                                                         1/1
  Verifying        : at-3.2.5-2.an23.x86_64                                                                                         1/1

Removed:
  at-3.2.5-2.an23.x86_64

Complete!
[root@localhost anuser]# uname -a
Linux localhost.localdomain 5.10.134-12.1.an23.x86_64 #1 SMP Thu Oct 13 11:38:24 CST 2022 x86_64 GNU/Linux
[root@localhost anuser]#