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

[Deepin Integration]~[V23-Beta3] feat: update xcb-util-errors to 1.0.1-3 by deepin-community-bot[bot]@deepin-community/xcb-util-errors by deepin-community-ci-bot[bot] #10896

Closed
deepin-bot bot opened this issue Nov 15, 2024 · 5 comments
Assignees
Labels
Project:integrated 集成管理相关 吴波 吴波
Milestone

Comments

@deepin-bot
Copy link

deepin-bot bot commented Nov 15, 2024

Package information | 软件包信息

包名 版本
xcb-util-errors 1.0.1-3

Package repository address | 软件包仓库地址

deb [trusted=yes] https://ci.deepin.com/repo/obs/deepin:/CI:/TestingIntegration:/test-integration-pr-2224/testing/ ./

Changelog | 更新信息

xcb-util-errors (1.0.1-3) unstable; urgency=medium

  • debian/control: Mark dev package as Multi-Arch: same.
  • debian/patches/0001: Mark the patch as Forwarded: not-needed.
@deepin-bot deepin-bot bot added the Project:integrated 集成管理相关 label Nov 15, 2024
@deepin-bot deepin-bot bot added this to the V23-Beta3 milestone Nov 15, 2024
@deepin-bot deepin-bot bot moved this to In progress in v23-集成管理 Nov 15, 2024
@deepin-bot
Copy link
Author

deepin-bot bot commented Nov 15, 2024

Integration Test Info

Test suggestion | 测试建议

xcb-util-errors 是 XCB(X C Binding)库的一个扩展工具库,用于简化处理和调试 X11 协议的错误信息。XCB 是一组用于与 X11 窗口系统通信的 C 语言函数库,xcb-util-errors 则帮助开发者更清晰地了解 X11 错误,提供更易于理解的错误消息,从而方便调试和开发 X11 应用程序。

主要功能

  1. 简化错误处理:提供更详细和人性化的错误消息,使得 X11 协议的错误更易于理解。
  2. 错误翻译:将复杂的 X11 错误代码翻译成可读性更强的描述信息。
  3. 支持多种语言:为不同语言提供翻译接口,帮助开发者更方便地在国际化项目中处理错误。
  4. XCB 扩展集成:可与 XCB 库无缝集成,适用于需要与 X11 协议进行低级别交互的应用程序。

安装 xcb-util-errors

在主流 Linux 发行版上,xcb-util-errors 可通过包管理器安装:

Debian/Ubuntu 系统上:

sudo apt update
sudo apt install libxcb-errors0-dev

CentOS/RHEL 系统上:

sudo yum install xcb-util-errors-devel

基本用法示例

xcb-util-errors 提供的 API 可以帮助从 XCB 返回的错误代码中提取可读的描述信息。以下是一个基本的示例,展示如何使用 xcb-util-errors 获取和打印可读的错误信息。

#include <stdio.h>
#include <xcb/xcb.h>
#include <xcb/xcb_errors.h>

int main() {
    // 初始化 XCB 连接
    int screen_num;
    xcb_connection_t *conn = xcb_connect(NULL, &screen_num);

    if (xcb_connection_has_error(conn)) {
        fprintf(stderr, "无法连接到 X 服务器\n");
        return -1;
    }

    // 初始化错误库
    xcb_errors_context_t *ctx;
    if (xcb_errors_context_new(conn, &ctx) < 0) {
        fprintf(stderr, "无法初始化 xcb-errors 上下文\n");
        xcb_disconnect(conn);
        return -1;
    }

    // 发送一个可能导致错误的请求
    xcb_intern_atom_cookie_t cookie = xcb_intern_atom(conn, 0, 12, "NON_EXISTENT");
    xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(conn, cookie, NULL);

    if (!reply) {
        xcb_generic_error_t *error = xcb_request_check(conn, cookie.sequence);
        if (error) {
            char buf[256];
            xcb_errors_get_name_from_cookie(ctx, error, sizeof(buf), buf);
            fprintf(stderr, "X11 错误: %s\n", buf);
            free(error);
        }
    }

    free(reply);
    xcb_errors_context_free(ctx);
    xcb_disconnect(conn);
    return 0;
}

编译示例

保存代码为 example.c,并使用以下命令进行编译:

gcc -o example example.c -lxcb -lxcb-errors

应用场景

xcb-util-errors 非常适合 X11 应用的开发和调试,特别是当需要在图形应用中处理底层的 X11 错误时。借助该库,开发者可以更清楚地了解 XCB 操作中发生的错误,为应用程序的错误处理提供更完善的支持。

通过提供对错误的详细描述,xcb-util-errors 极大地减少了调试低级别 X11 协议的难度,使得 X11 开发更加顺畅。

Influence | 影响范围

ADDITIONAL INFORMATION | 额外补充

@deepin-bot
Copy link
Author

deepin-bot bot commented Nov 15, 2024

IntegrationProjector Notify the author
@deepin: Integrated issue updated

@deepin-bot
Copy link
Author

deepin-bot bot commented Nov 15, 2024

IntegrationProjector Bot
Deepin Testing Integration Project Manager Info
Link to deepin-community/Repository-Integration#2224

@Zeno-sole Zeno-sole assigned babyfengfjx and unassigned Zeno-sole and hudeng-go Nov 15, 2024
@babyfengfjx babyfengfjx assigned kobe337 and unassigned babyfengfjx Nov 15, 2024
@babyfengfjx babyfengfjx moved this from In progress to 测试中 in v23-集成管理 Nov 15, 2024
@babyfengfjx babyfengfjx added the 吴波 吴波 label Nov 15, 2024
@babyfengfjx
Copy link

@kobe337 请开展集成验证。

@kobe337
Copy link

kobe337 commented Nov 18, 2024

【环境】:
镜像:Deepin OS-25-20241028133527-1_x86_64
内核:Linux deepin-PC 6.6.59-amd64-desktop-hwe #23.01.00.39 SMP PREEMPT_DYNAMIC Tue Nov 5 17:23:22 CST 2024 x86_64 GNU/Linux

【结论】:
测试通过,暂无严重问题及影响, 安装校验、版本核对,基本功能验证,加载库情况查看,非预装应用验证通过,请研发同事确认,是否推送内测。
Image

@kobe337 kobe337 assigned Zeno-sole and unassigned kobe337 Nov 18, 2024
@kobe337 kobe337 moved this from 测试中 to 测试通过 in v23-集成管理 Nov 18, 2024
@Zeno-sole Zeno-sole moved this from 测试通过 to 已集成 in v23-集成管理 Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Project:integrated 集成管理相关 吴波 吴波
Projects
Status: 已集成
Development

No branches or pull requests

4 participants